"划分测试集-query and gallery-分别生成green图和正常图的索引文件"
python DataDeal/divided_dataset.py --data_dir_query ../data/test/query --data_dir_gallery ../data/test/gallery --save_dir ../data/test/
python get_query_gallery_from_train.py

"从头训练过程"
python train.py --config_file configs/naic_round2_model_50_a.yml
"resnet18"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('resnet18')" MODEL.PRETRAIN_PATH "('../PreModel/resnet18-5c106cde.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet34"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('resnet34')" MODEL.PRETRAIN_PATH "('../PreModel/resnet34-333f7ec4.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet50"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('resnet50')" MODEL.PRETRAIN_PATH "('../PreModel/resnet50-19c8e357.pth')" \
OUTPUT_DIR "('../model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet101"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('resnet101')" MODEL.PRETRAIN_PATH "('../PreModel/resnet101-5d3b4d8f.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet50_ibn_a"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('resnet50_ibn_a')" MODEL.PRETRAIN_PATH "('../PreModel/r50_ibn_a.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"hrnet"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('hrnet')" MODEL.PRETRAIN_PATH "('../PreModel/hrnetv2_w30_imagenet_pretrained.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet101_ibn_a"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('resnet101_ibn_a')" MODEL.PRETRAIN_PATH "('../PreModel/resnet101_ibn_a-59ea0ac6.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b1"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('efficientnet-b1')" MODEL.PRETRAIN_PATH "('../PreModel/efficientnet-b1-f1951068.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b2"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('efficientnet-b2')" MODEL.PRETRAIN_PATH "('../PreModel/efficientnet-b2-8bb594d6.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b3"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('efficientnet-b3')" MODEL.PRETRAIN_PATH "('../PreModel/efficientnet-b3-5fb5a3c3.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b4"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('efficientnet-b4')" MODEL.PRETRAIN_PATH "('../PreModel/efficientnet-b4-6ed6700e.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b5"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.NAME "('efficientnet-b5')" MODEL.PRETRAIN_PATH "('../PreModel/efficientnet-b5-b6417697.pth')" \
OUTPUT_DIR "('../save_model/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64

"断点续训（新的模型会保存到model_continue文件夹下，方便测试不同的trick）"
"resnet18"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('resnet18')" \
MODEL.PRETRAIN_PATH "('../save_model/resnet18/resnet18_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet34"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('resnet34')" \
MODEL.PRETRAIN_PATH "('../save_model/resnet34/resnet34_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet50"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('resnet50')" \
MODEL.PRETRAIN_PATH "('../save_model/resnet50/resnet50_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet50_ibn_a"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('resnet50_ibn_a')" \
MODEL.PRETRAIN_PATH "('../save_model/resnet50_ibn_a/resnet50_ibn_a_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"resnet101_ibn_a"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('resnet101_ibn_a')" \
MODEL.PRETRAIN_PATH "('../save_model/resnet101_ibn_a/resnet101_ibn_a_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"hrnet"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('hrnet')" \
MODEL.PRETRAIN_PATH "('../save_model/hrnet/hrnet_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b1"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('efficientnet-b1')" \
MODEL.PRETRAIN_PATH "('../save_model/efficientnet-b1/efficientnet-b1_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b2"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('efficientnet-b2')" \
MODEL.PRETRAIN_PATH "('../save_model/efficientnet-b2/efficientnet-b2_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b3"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('efficientnet-b3')" \
MODEL.PRETRAIN_PATH "('../save_model/efficientnet-b3/efficientnet-b3_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b4"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('efficientnet-b4')" \
MODEL.PRETRAIN_PATH "('../save_model/efficientnet-b4/efficientnet-b4_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64
"efficientnet-b5"
python train.py --config_file=configs/naic_round2_model_50_a.yml MODEL.DEVICE_ID "('0')" DATASETS.NAMES "('mydata')" \
DATASETS.ROOT_DIR "('../data')" MODEL.PRETRAIN_CHOICE "('finetune')" MODEL.NAME "('efficientnet-b5')" \
MODEL.PRETRAIN_PATH "('../save_model/efficientnet-b5/efficientnet-b5_60.pth')" \
OUTPUT_DIR "('../model_continue/')" \
SOLVER.MAX_EPOCHS 60 SOLVER.IMS_PER_BATCH 64